<template>
	<view class="act-tag" :style="[customStyle]">
		<text class="item u-font-24">{{name}}</text>
	</view>
</template>

<script>
	import { activityTypeName } from '@/common/utils/goods.js'
	export default{
		props:{
			activityType:{
				type:Number
			},
			type:{
				type:[String,Number],
				default:0
			},
			// 自定义样式
			customStyle:{
				type:Object,
				default:()=>{}
			}
		},
		computed:{
			name(){
				return activityTypeName(this.type)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.act-tag{
		display: inline-block;
		color: #fff;
		.item{
			background-image: linear-gradient(to right,#F16500, #FF0000);
			padding: 0 8rpx;
			line-height: 32rpx;
			text-align: center;
			border-radius: 4rpx;
		}
	}
</style>
